Notice: Undefined variable count on line 371