Show first n elements of array, and count elements not shown
&lt;?  if ($count = $this-&gt;likes-&gt;count()) { 



It is more common to use the long form of the opening tag.  The second tag is only optionally supported by PHP installations.  Also, it can suddenly stop working if your host adjusts the configuration (possibly accidentally during an upgrade).  

&lt;?php
    if ($count = $this-&gt;likes-&gt;count()) {


It's also more common to put the code on a new line after the opening tag.  Unless you're opening and closing the PHP block on the same line.  

If you're interested, there is a PHP Coding Standard.  Personally I don't always follow it, but I find it a good way to make decisions on issues that aren't important to me.  It also makes your code more portable.  


            if ($r &gt;= $visible) { break; };



I'd break this up into multiple lines for readability.  

            if ($r &gt;= $visible) {
                break;
            }


The final semi-colon is unnecessary there.  It doesn't harm anything (perhaps a wasted clock cycle on the null instruction), but neither does it contribute anything.  


        if ($count &gt; $visible) { 



I might write this as 

        if ( $hidden &gt; 0 ) { 


The reason being that you then go on to output $hidden.  You also might consider moving the definition of $hidden to be directly before this if statement.  That puts all the code related to $hidden together and makes it easier to follow the logic.  

Alternately, you could stay with the original if and replace $hidden with $count - $visibility.  Then you don't need to define $hidden at all.