Use widget count instead of cycles.length