implemented the count and removed the R::log