CSS doesn't have a 'count' API which allows us to have rules based on the amount of elements or selectors. For example, you can't say "do x when there are 6 or more items."
However, you can do some funky things with some fancy selectors: https://alistapart.com/article/quantity-queries-for-css/