Please what are the limits to getTotalCount() of a filtered or unfiltered dataset?

Will .getTotalCount() of a filtered or unfiltered dataset return the count total number even if it is more than 1000?