added count function

should use this to fill in the autocomplete (also need to make object
inputs with diff. labels and values)