If you don't need a live update, you can try this approach:
1) set the delegate from the menu:
[theMenu setDelegate:self]
2) and implement the delegate method:
- (void)menuWillOpen:(NSMenu *)menu {
NSUInteger count = [self.tableView numberOfRows];
[[menu itemAtIndex:0] setTitle: [NSString stringWithFormat:@"%d rows", count]];
}
, . , - , KVO . KVO, StatusItem.