Error thrown

Attempt to assign property "count" on null