pub fn dependency_count() -> Option<usize> {
    LISTENERS.with(|listeners| {
        listeners.borrow().last().map(|last_context| {
            last_context
                .upgrade()
                .expect_throw("Running should be valid while inside reactive scope")
                .borrow()
                .as_ref()
                .unwrap_throw()
                .dependencies
                .len()
        })
    })
}
/// Gets the number of dependencies of the current reactive scope.
///
/// If the function is called outside a reactive scope, it will return `None`.
///
/// # Example
/// ```
/// use sycamore_reactive::*;
///
/// assert_eq!(dependency_count(), None);
///
/// let state = Signal::new(1);
/// create_effect(move || {
///     assert_eq!(dependency_count(), Some(0));
///     state.get();
///     assert_eq!(dependency_count(), Some(1));
/// });
/// ```
Gets the number of dependencies of the current reactive scope.
If the function is called outside a reactive scope, it will return `None`.
Gets the number of dependencies of the current reactive scope . If the function is called outside a reactive scope it will return ` None ` .
pub fn dependency_count() -> Option<usize> {
    LISTENERS.with(|listeners| {
        listeners.borrow().last().map(|last_context| {
            last_context
                .upgrade()
                .expect_throw("Running should be valid while inside reactive scope")
                .borrow()
                .as_ref()
                .unwrap_throw()
                .dependencies
                .len()
        })
    })
}
pub fn dependency_count ( ) -> Option < usize > { LISTENERS . with ( | listeners | { listeners . borrow ( ) . last ( ) . map ( | last_context | { last_context . upgrade ( ) . expect_throw ( " " ) . borrow ( ) . as_ref ( ) . unwrap_throw ( ) . dependencies . len ( ) } ) } ) }
Gets the number of dependencies of the current reactive scope.
Gets the number of dependencies of the current reactive scope .
example
```
use sycamore_reactive::*.

assert_eq!(dependency_count(), None).

let state = Signal::new(1);
create_effect(move || {
assert_eq!(dependency_count(), Some(0));
state.get();
assert_eq!(dependency_count(), Some(1));
});
```
` ` ` use sycamore_reactive :: * . assert_eq! ( dependency_count () None ) . let state = Signal :: new ( 1 ) ; create_effect ( move || { assert_eq! ( dependency_count () Some ( 0 )) ; state . get () ; assert_eq! ( dependency_count () Some ( 1 )) ; } ) ; ` ` `