how to store no.of objects in variable count