Fixed notice errors. Only get site count if there is one.