Do not hard code groups count in TableAdapter and PeriodicTableView

Just to make the whole thing more flexible.