My favorite strategy is to translate all problems of this kind into one counting lattice paths across a rectangle, since this always works, and only requires remembering the formula for the number of lattice paths across a $a\times b$ rectangle (which follows from the transformation of combinations into lattice paths), namely $\binom{a+b}a=\binom{a+b}b.$
Here just translate each byte with value $v$ into a vertical step at line $v$ of a grid; a horizontal step between grid lines $i$ and $i+1$ will then necessarily occur at level $l$, where $l$ is the number of bytes in the array with value $v\leq i$. The vertical grid lines need to numbered $0$ to $255$, the horizonal ones $0$ to $7$, so one gets a lattice path across a $7\times 255$ rectangle.
Added Since I gather from a comment to another answer that lattice paths are "beyond" the OP, I'll add a short explanation. A lattice path across a $a\times b$ rectangle (with $a,b\in\mathbf N$) is a way to traverse such a rectangle from one (fixed) corner (the origin) to the diagonally opposite corner, by taking successive unit steps parallel to one of the sides, and in the right direction (no backing up). Clearly one needs exacly $a+b$ steps, of which $a$ vertical and $b$ horizontal steps (assuming the rectangle is aligned in that way), and arranging such steps in any order will do. So it just amounts to choosing $a$ elements (positions of vertical steps) among a set of $a+b$ (available positions), and it is just one possible way to formulate the combinatorial question defining binomial coefficients.
The reason that the lattice path point of view is often more convenient than the "choose $k$ out of $n$" point of view is merely that many enumerative combinatorial problems having (arbitrary) binomial coefficients as answer can be easily translated into a problem of choosing a lattice path across an appropriate rectangle. Examples are (0)(already mentioned) choosing a subset of $k$ among $n\geq k$ (with $(a,b)=(k,n-k)$); (1) choosing a $k$-multiset among $n>0$ (so repetitions are allowed; take $(a,b)=(k,n-1)$, number the base set $0,\ldots,n-1$ and take as many vertical steps on grid line $j$ as the multiplicity of $j$ in the multiset); (2) choosing a $k$-multiset among $n\leq k$, with each of those $n$ chosen at least once (take $(a,b)=(k-n,n-1)$, visit as many grid points on grid line $j$ as the multiplicity of $j$ in the multiset); (3) choosing an additive decomposition $m=a_1+\cdots+a_l$ of $m\in\mathbf N$ with specified $l>0$ and with each $a_i\in\mathbf N$ (take $(a,b)=(m,l-1)$, and do $a_{j+1}$ vertical steps on grid line $j$ for $0\leq j; this is really just (1) with $(k,n)=(m,l)$); (4) choosing a weakly increasing function (or sequence) $f:[1,k]\to[0,n]$ (take $(a,b)=(n,k)$, reach vertical grid line $j\in[1,k]$ by a horizontal step at level $f(j)$); (5) choosing a strictly increasing function $f:[1,k]\to[1,n]$ (take $(a,b)=(n-k,k)$, first reach vertical grid line $j\in[1,k]$ by at step number $f(j)$; this is (0) transposed). The "stars and bars" argument is unnecessary. See also section 7.2.1.3 (Volume 4A) of Knuth's Art of Computer Programming for more points of view.