counter initialized to 1 instead of 0 to avoid foreign key error