Template._stats.helpers({

  statistics: function(){
    var user = Session.get("userObject");

    var completedBets = Bets.find({ status: "completed" }).count();

    var wins = Bets.find({ winner: user}).count();

    var losses = completedBets - wins;

    return [wins, losses]
  }

});

@@ -19,17 +19,16 @@
 lpers(%7B%0A
-%0A
   statis
@@ -72,17 +72,17 @@
 ion.get(
-%22
+'
 userObje
@@ -87,20 +87,19 @@
 ject
-%22);%0A
+'),
 %0A    
-var
+   
  com
@@ -131,17 +131,17 @@
 status: 
-%22
+'
 complete
@@ -145,9 +145,9 @@
 eted
-%22
+'
  %7D).
@@ -153,26 +153,25 @@
 .count()
-;%0A
+,
 %0A    
-var
+   
  wins = 
@@ -194,16 +194,17 @@
 er: user
+ 
 %7D).count
@@ -209,18 +209,17 @@
 nt()
-;%0A
+,
 %0A    
-var
+   
  los
@@ -277,13 +277,12 @@
 es%5D%0A
+
   %7D%0A
-%0A
 %7D);%0A

Clean up variable class inside statistics _stats helper.