Begin stats connect implementation

A class for performing connections while keeping track of statistics