where('pattern_id', $pattern_id)->count(); } }