You need to implement a function called count_group_divisions that calculates the number of ways to partition N items into groups with specific conditions. The function takes into account various parameters that define the constraints on grouping.
N (1 ≤ N ≤ 10^6): The total number of items to divide into groups.
A (1 ≤ A ≤ B): The minimum number of groups to form.
B (A ≤ B ≤ 10^6): The maximum number of groups to form.
C (1 ≤ C ≤ D): The minimum size of each group.
D (C ≤ D ≤ N): The maximum size of each group.
Output Requirements
The function should return a single integer, which is the number of ways to partition the N items according to the above rules, calculated modulo (10^9 + 7).