Replace sizeof() with count()