set count to 0 if data is empty