# count_diff_change_lines

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/diff_utils/count_diff_change_lines)

Count added and removed lines in unified-diff lines.

## Signature

```python
count_diff_change_lines(
    lines: list[str],
) -> DiffStats
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `lines` | `list[str]` | Yes | Unified-diff lines. |

## Returns

`DiffStats`

Additions and deletions, excluding file headers.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/4bfa52000ef65ac623d8ada0cb67f67cbdd663ea/libs/code/deepagents_code/diff_utils.py#L204)