add count column to data