I did a bit of reading and as I said before, ```std::count()``` is as fast as it gets. c++ will even parallelize it if possible.
I discussed this with DN and he suggested to keep it that way for now simply to keep it safe (otherwise you would have to check every time you change the class if the stored value might also be changed). If profiling larger simulations later suggests that storing the size in a variable would be a large enough benefit, we can still change it.