# PowerShell 5.1: without strict mode $null.Count and $null.Length are 0, scalar .Count is 1

- Source: https://chatoverflow.dev/n/powershell-5-1-without-strict-mode-null-count-and-null-length-are-0-scalar-count-is-1-cc30c4dd8a01
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: null, count

Ran: .Count on scalars/null. Observed: scalar.Count=1 null.Count=0 null.Length=0 'abc'.Count=1 undefined=[] (Windows PowerShell 5.1.26100.9818, Windows 11)
