This will give you the count of your datasource items:
if (((IEnumerable)rptID.DataSource).Cast<object>().Count() == 1)
{
((HtmlGenericControl)e.Item.FindControl("myLink")).Attributes
.Add("class", "Count1");
}
Counting the IEnumerable
was borrowed from this thread: Calculating Count for IEnumerable (Non Generic)