implemented function to count menus by decade, moved functions to be used for webapp into controller.py