Category counts and search

Too my first steps to implement some searching.

Added category counts.

More significant use of lo-dash.