The problem with your above code is that the first console.log is calling Meteor.user() itself which is still making the whole function overly reactive to any change in the user object. Try removing the first console.log.
See my tip here, then you can write:
categoriesNumber() {
if (!Meteor.userId()) return 0; // to get rid of the "Exception in template helper..."
let user = Meteor.user({username: 1});
console.log('categoriesNumber(), user = '+user);
return Categories.find({owner: user.username}).count();
},
Also be careful, sometimes when logging-in Meteor.userId() is set before the Meteor.user() object is fully populated by the server. Hence I would actually write:
categoriesNumber() {
let user = Meteor.user({username: 1});
if (!user || !user.username) return 0;
return Categories.find({owner: user.username}).count();
},
Without my patch this would have to be:
categoriesNumber() {
if (!Meteor.userId()) return 0;
let user = Meteor.users.findOne(Meteor.userId(), {fields: {username: 1}});
if (!user.username) return 0;
return Categories.find({owner: user.username}).count();
},