replace size with count