Added tests for extend and count