Number of entries

I use will_paginate to get results:

@results = Users.paginate(:all, :conditions => "...

But how can I get a number of reults?

x = @results.empty? ? 1 : 0

And instead of empty, you should use "blank?", that would work even if
@results is "nil"

x = @results.blank? ? 1 : 0

@results should never be nil unless he's forgotten to define the
variable which would just be Bad Programming.

@results.size will give you the number in that ‘page’

@results.total_entries will give you the total number of results you’re paginating over