After the update of SuiteCRM to all but mandatory use of the SuiteP theme, I've spent way too much time trying to fix things. One of the problems is the number of Recently Viewed items. Five items, and not even five accounts is a real problem for someone who looks at many things for any given account, plus is working on several accounts in any given day.
I looked in the forums and other places (even made a request to get the answer), albeit it was my own administrator that found the answer.
The file, at least with my setup is the _headerModuleList.tpl file, and for me, line 813. Just a little further down on line 832 is the number of Favorites that are shown.
I changed the recently viewed from five to 12, as can be seen in this code —> {if $smarty.foreach.lastViewed.index < 12}
Same with the favorites (I'm not sure a maximum should even be imposed, albeit I'll start with 12) –> {if $smarty.foreach.lastViewed.index < 12}
I'm using the SuitePImproved theme, so it would otherwise have the "normal" file path, albeit here's the file path to look for…
custom/themes/SuitePImproved/tpls/_headerModuleList.tpl
If this helps you, please be sure to comment and let me know that it's helping others.